#!/bin/bash
echo \#!/bin/bash
echo set -e
echo cd /home/torqueusers/mnagl/scintillate
echo if \[ -f \"${2%%\.*}-time.dat\" \]
echo then
echo   echo Output for $2 already exists. Conversion skipped.
echo   exit 1
echo else
echo   echo Creating spectra...
echo   ionice -c3 python3 ./hist.py --stopafter 10000 $1 --pattern ${2%%\.*} ${2%%\.*}.?.dat
echo fi
